//
//  QQModelData.m
//  01-UITableViewQQ发现界面
//
//  Created by parkhome2 on 17/3/24.
//  Copyright © 2017年 parkhome2. All rights reserved.
//

#import "QQModelData.h"

@implementation QQModelData


+(NSArray *)loadQQModelData{
    
    // 加载数据
    // 获取全路径
    NSString *path = [[NSBundle mainBundle] pathForResource:@"qq.plist" ofType:nil];
    NSArray *arrayData = [NSArray arrayWithContentsOfFile:path];
    
    // 字典转模型
    // 创建最外层数组
    NSMutableArray *arrMaxMutable = [NSMutableArray array];
    
    // 遍历plist数据
    for (NSArray *minDataArr in arrayData) {
        
        // 创建里面的数组
        NSMutableArray *arrMinMutable = [NSMutableArray array];
        
        for (NSDictionary *dic in minDataArr) {
            
            QQModelData *QQData = [[QQModelData alloc] init];
//            QQData.icon = dic[@"icon"];
//            QQData.title = dic[@"title"];
            [QQData setValuesForKeysWithDictionary:dic];
            
            
            [arrMinMutable addObject:QQData];
            
           
        }
        [arrMaxMutable addObject:arrMinMutable];
    }
    
    return arrMaxMutable;
}
@end
